<?php //Util::registerScriptFile(Util::themeUrl().'/js/jquery-ui.min.js');?>
<?php Util::registerScriptFile(Util::themeUrl().'/js/custome.datepicker.js');?>
<?php $this->pageTitle = 'Thiết lập thông tin tài khoản';?>
<div class="heading">
    <h1><a class = "title-page"><?php echo $this->pageTitle;?></a></h1>
    <div class="controls">

    </div>
</div>
<div class="content">
	<div class="user-profile" style="">
		<div class="left-column form form-active-profile">
			<?php $form=$this->beginWidget('CActiveForm', array(
				'id'=>'member-form',
				'enableAjaxValidation'=>false,
				//'htmlOptions' => array('enctype' => 'multipart/form-data')
			)); ?>
			<div class="flash-notice-profile"><p class="flash-notice">Chú ý:</p>
				<ul>
					<li>Các thông tin có dấu (*) là bắt buộc phải khai báo.</li>
					<li>Một số thiết lập dưới đây sau khi hoàn tất sẽ không được chỉnh sửa, bạn cần chắc chắn rằng các thông tin khai báo là chính xác.</li>
					<li>Những thông tin này sẽ được ban quản lý kiểm tra xét duyệt, nếu phát hiện thông tin ko chính xác sẽ xử lý tùy mức độ.</li>
					<li>Mọi thắc mắc, góp ý xin liên hệ trực tiếp với ban quản lý.</li>
					<li>Và quan trọng nhất, chúc bạn có một ngày thật vui vẻ ^^.</li>
				</ul>
			</div>
			
			<br/>
			<div class="row personal">
				<label for="Member_fullname">
					<span>Thành viên</span>
					<!--<span style="margin-left: 180px;">Số chứng minh nhân dân</span>
					<span style="margin-left: 150px;">Giới tính</span>-->
				</label>
				<span class="username" style="margin-left:0px"><?php echo Util::formatFullName(CHtml::encode($member->fullname))?></span>
				<!--<span class="cmnd"><?php //echo CHtml::encode($member->cmnd)?></span>
				<span class="sex"><?php //echo Util::itemAlias('Sex', $member->sex)?></span>-->
			</div>
			<br/>
			
			<?php echo $form->errorSummary(array($member, $education)); ?>
			<?php //echo $form->errorSummary($education); ?>
			
			<div class="hr-style1" style="margin-top: 20px;margin-bottom: -10px;">&nbsp;</div>

<!----------------Thông tin cá nhân----------------------------------------------------------------------------------->
		    <?php $this->beginWidget('ext.coolfieldset.JCollapsibleFieldset', array('legend'=>'Thông tin cá nhân')); ?>
				<div class="row">
					<?php echo $form->labelEx($member,'cmnd'); ?>
					<?php echo $form->textField($member,'cmnd',array('size'=>10, 'maxlength'=>12)); ?>
					<?php echo $form->error($member,'cmnd'); ?>
				</div>
				<div class="row">
					<?php echo $form->labelEx($member,'sex'); ?>
					<?php echo $form->dropDownList($member,'sex', Util::itemAlias('Sex')); ?>
					<?php echo $form->error($member,'sex'); ?>
				</div>
				<div class="row">
					<?php echo $form->labelEx($member,'birthday'); ?>
					<?php echo $form->textField($member,'birthday',array('class'=> 'picker-date')); ?>
					<?php echo $form->error($member,'birthday'); ?>
				</div>
				<div class="row">
					<?php echo $form->labelEx($member,'birthplace'); ?>
					<?php echo $form->textField($member,'birthplace',array('size'=>60,'maxlength'=>255)); ?>
					<?php echo $form->error($member,'birthplace'); ?>
				</div>
				<div class="row">
					<?php echo $form->labelEx($member,'address'); ?>
					<?php echo $form->textField($member,'address',array('size'=>60,'maxlength'=>255)); ?>
					<?php echo $form->error($member,'address'); ?>
				</div>
				<!-- <div class="row">
					<?php echo $form->labelEx($member,'avatar'); ?>
					<?php echo $form->fileField($member,'avatar',array('size'=>60,'maxlength'=>255)); ?>
					<?php echo $form->error($member,'avatar'); ?>
				</div> -->
			<?php $this->endWidget(); ?>

<!----------------Thông tin liên hệ----------------------------------------------------------------------------------->
			<?php $this->beginWidget('ext.coolfieldset.JCollapsibleFieldset', array('legend'=>'Thông tin liên hệ')); ?>
			    <div class="row">
					<?php echo $form->labelEx($member,'email'); ?>
						<?php echo $form->textField($member,'email',array('size'=>60,'maxlength'=>128)); ?>
					<?php echo $form->error($member,'email'); ?>
				</div>
				<div class="row">
					<?php echo $form->labelEx($member,'phone'); ?>
						<?php echo $form->textField($member,'phone',array('size'=>20,'maxlength'=>20)); ?>
					<?php echo $form->error($member,'phone'); ?>
				</div>

				<div class="row">
					<?php echo $form->labelEx($member,'cellphone'); ?>
						<?php echo $form->textField($member,'cellphone',array('size'=>20,'maxlength'=>20)); ?>
					<?php echo $form->error($member,'cellphone'); ?>
				</div>

				<div class="row">
					<?php echo $form->labelEx($member,'contact_address'); ?>
						<?php echo $form->textField($member,'contact_address',array('size'=>60,'maxlength'=>255)); ?>
					<?php echo $form->error($member,'contact_address'); ?>
				</div>
			<?php $this->endWidget(); ?>

<!----------------Thông tin ân nhân----------------------------------------------------------------------------------->
			<?php $this->beginWidget('ext.coolfieldset.JCollapsibleFieldset', array('legend'=>'Thông tin ân nhân')); ?>
			    <div class="row">
					<?php echo $form->labelEx($member,'donor_name'); ?>
						<?php echo $form->textField($member,'donor_name',array('size'=>60,'maxlength'=>128)); ?>
					<?php echo $form->error($member,'donor_name'); ?>
				</div>
			    <div class="row">
					<?php echo $form->labelEx($member,'donor_email'); ?>
						<?php echo $form->textField($member,'donor_email',array('size'=>60,'maxlength'=>128)); ?>
					<?php echo $form->error($member,'donor_email'); ?>
				</div>
				<div class="row">
					<?php echo $form->labelEx($member,'donor_address'); ?>
						<?php echo $form->textField($member,'donor_address',array('size'=>60,'maxlength'=>255)); ?>
					<?php echo $form->error($member,'donor_address'); ?>
				</div>
			<?php $this->endWidget(); ?>

<!----------------Thông tin khóa học----------------------------------------------------------------------------------->
			<?php $this->beginWidget('ext.coolfieldset.JCollapsibleFieldset', array('legend'=>'Thông tin khóa học')); ?>
				<div class="row">
					<?php echo $form->labelEx($education,'school_name'); ?>
						<?php echo $form->textField($education,'school_name',array('size'=>60,'maxlength'=>128)); ?>
					<?php echo $form->error($education,'school_name'); ?>
				</div>

				<div class="row">
					<?php echo $form->labelEx($education,'major'); ?>
						<?php echo $form->textField($education,'major',array('size'=>60,'maxlength'=>255)); ?>
					<?php echo $form->error($education,'major'); ?>
				</div>

				<div class="row">
					<?php echo $form->labelEx($education,'start_year'); ?>
						<?php echo $form->textField($education,'start_year',array('class'=> 'picker-monthyear')); ?>
					<?php echo $form->error($education,'start_year'); ?>
				</div>

				<div class="row">
					<?php echo $form->labelEx($education,'end_year'); ?>
						<?php echo $form->textField($education,'end_year',array('class'=> 'picker-monthyear')); ?>
					<?php echo $form->error($education,'end_year'); ?>
				</div>
				<div class="row">
					<?php $this->widget('SemesterForm', $paramSemesterForm); ?>
				</div>
			<?php $this->endWidget(); ?>

<!----------------Hoạt động xã hội----------------------------------------------------------------------------------->
			<?php $this->beginWidget('ext.coolfieldset.JCollapsibleFieldset', array('legend'=>'Hoạt động xã hội')); ?>
				<div class="row">
					<?php echo $form->labelEx($member,'social_position'); ?>
						<?php echo $form->textArea($member,'social_position',array('rows'=>6, 'cols'=>50, 'style' => 'width : 90%')); ?>
					<?php echo $form->error($member,'social_position'); ?>
				</div>

				<div class="row">
					<?php echo $form->labelEx($member,'social_activity'); ?>
						<?php echo $form->textArea($member,'social_activity',array('rows'=>6, 'cols'=>50, 'style' => 'width : 90%')); ?>
					<?php echo $form->error($member,'social_activity'); ?>
				</div>
			<?php $this->endWidget(); ?>
<!------------------------------------------------------------------------------------------------------------------->
			
			<?php if (!$member->isNewRecord): ?>
		        <input type="hidden" name="update_id" value="<?php echo $member->user_id; ?>"/>
			<?php endif; ?>

			<table class="button-form" style="text-align: center;width: 100%">
				<tr>
					<td align="center">
						<div class="row buttons"><?php echo CHtml::submitButton('Hoàn tất', array('class' => 'controls btn')); ?></div>
					</td>
				</tr>
			</table>
		<?php $this->endWidget(); ?>
		</div>
	</div>
</div>
<?php if ($member->avatar != "" && !isset($_POST['Member'])) : ?>
<script type="text/javascript">
<!--
	alert("Cập nhật hình ảnh thành công");
//-->
</script>
<?php endif;?>

